﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;

namespace zevenseas.SharePoint.Solutions.FeatureBlocker.ApplicationPages
{
    public enum TypeOfAction
    {
        Block,
        Hide,
        Redirect
    }

    public class FeatureCollection : SPPersistedObject
    {
        [Persisted]
        public List<string> Features;

        public FeatureCollection() { }

        public FeatureCollection(string name, SPPersistedObject parent, Guid id)
            : base(name, parent, id)
        {
        }
    }

    public class FeatureBlockerConfig : SPPersistedObject
    {
        [Persisted]
        public TypeOfAction Action;

        [Persisted]
        public string redirectUrl;

        [Persisted]
        public string listUrl;

        [Persisted]
        public bool ExcludeFarmAdmin;

        public FeatureBlockerConfig() { }

        public FeatureBlockerConfig(string name, SPPersistedObject parent, Guid id)
            : base(name, parent, id)
        {
        }
    }
}
